package tgc.edu.tms.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.tms.custom.CommonService;
import tgc.edu.tms.entity.TbClass;
import tgc.edu.tms.repository.TbClassRepository;
@Service
public class TbClassService extends CommonService<TbClass, Integer>{
	@Autowired
	private TbClassRepository tbClassDAO;
	
	public List<TbClass> findByProfession_id(Integer proId) {
		return tbClassDAO.findByProfession_id(proId);
		
	}

	public TbClass findBytbclassandprofesion(String profesion, String tbclass) {
		return tbClassDAO.findBytbclassandprofesion(profesion,tbclass);
	}

	public List<TbClass> findByprofessionID(Integer professionid) {
		return tbClassDAO.findByprofessionID(professionid);
	}


	public Integer findtiaoshu(Integer id2) {
		return tbClassDAO.findtiaoshu(id2);
	}

	public TbClass findByTbclass(String tbclass) {
		return tbClassDAO.findByTbclass(tbclass);
	}

	public TbClass findByProfessionIDAndtbclassName(Integer id, String tbclassname) {
		return tbClassDAO.findByProfessionIDAndtbclassName(id,tbclassname);
	}


	public TbClass findByNameAndProfession(Integer id, String name) {
		return tbClassDAO.findByNameAndProfession(name, id);
	}
}
